<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/dialog.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/upload.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
<script type="text/javascript" src="/resource/js/dialog.js"></script>
<script type="text/javascript" src="/resource/js/admin/adminedit.js"></script>
</head>
<body>
	<div class="position"><span>您的当前位置：</span>组织机构 > <a href="./">用户管理</a> > ${(admin.id == 0)?string("新建","修改")}用户</div>
	<form method="post" action="editdo" onsubmit="return checkform()">
		<div class="rightbody m">
			<div class="rightbodycontent">
				<table cellspacing="1" cellpadding="4" class="tableedit">
					<tr>
						<td>账号：</td>
						<td>
							<#if admin.account?? && admin.account == 'admin'><input type="text" value="${admin.account!}" disabled style="background:white;" />
							<#else><input type="text" name="account" id="account" value="${admin.account!}" /> <span style="color:red">*</span> 用于登录，请用英文字母。
							</#if>
						</td>
						<td width="260" rowspan="${(admin.account?? && admin.account == 'admin')?string(3,6)}">
						    <img id="face_pre" src="${admin.face!}" width="80" height="80" />
						    <input type="hidden" name="face" id="face" value="${admin.face!}" /><br />
						    <a class="linkbtn upload">本地上传</a>
							<input type="file" id="facefile" name="srcfile" class="uploadfile" onchange="upload()" accept="image/*" />
			                <div id="uploading" style="display:none;">正在上传中...</div>
						</td>
					</tr>
					<tr>
						<td>姓名：</td>
						<td>
							<input type="text" name="name" id="name" value="${admin.name!}" /> <span style="color:red">*</span> 用于显示，可以使用姓名等汉字。
						</td>
					</tr>
					<tr>
						<td>所在部门：</td>
						<td>
						    <select name="departmentid">
						        <#list departments as department>
		                        	<option value="${department.id}"<#if admin.department?? && department.id == admin.department.id> selected</#if>>${department.name}</option>
		                        </#list>
						    </select>
						</td>
					</tr>
					<#if !admin.account?? || admin.account != 'admin'>
						<tr>
							<td>担任角色：</td>
							<td>
								<#list adminroles as adminrole>
									<label><input type="checkbox" name="adminroleids" value="${adminrole.id}"<#if adminroleIds?seq_contains(adminrole.id)> checked</#if> />${adminrole.name}</label>
								</#list>
							</td>
						</tr>
						<tr>
							<td>全局权限：</td>
							<td>
								<#list adminglobalpermissions as adminglobalpermission>
									<label><input type="radio" name="adminglobalpermissionid" value="${adminglobalpermission.id}"<#if adminglobalpermission.id == admin.adminGlobalpermission.id> checked</#if> />${adminglobalpermission.name}</label>
								</#list>
							</td>
						</tr>
					</#if>
					<tr>
		                <td>性别：</td>
		                <td colspan="2">
		                    <label><input type="radio" name="sex" value="男"<#if !admin.sex?? || admin.sex != '女'> checked</#if> />男</label>
		                    <label><input type="radio" name="sex" value="女"<#if admin.sex?? && admin.sex == '女'> checked</#if> />女</label>
		               </td>
		            </tr>
					<tr>
						<td>职位：</td>
						<td colspan="2">
							<input type="text" name="position" value="${admin.position!}" />
						</td>
					</tr>
					<tr>
						<td>手机号码：</td>
						<td colspan="2">
							<input type="text" name="mobile" value="${admin.mobile!}" />
						</td>
					</tr>
					<tr>
						<td>电子邮箱：</td>
						<td colspan="2">
							<input type="text" name="email" value="${admin.email!}" />
						</td>
					</tr>
					<tr>
						<td>微信号：</td>
						<td colspan="2">
							<input type="text" name="weixinid" value="${admin.weixinId!}" />&nbsp;注意不是微信登录账号。
						</td>
					</tr>
					<tr>
						<td>其它描述：</td>
						<td colspan="2">
							<textarea name="description" rows="5" cols="120">${admin.description!}</textarea>
						</td>
					</tr>
					<tr>
						<td>排序：</td>
						<td>
							<input type="text" name="sort" id="sort" value="${admin.sort}" /> <span style="color:red">*</span>
						</td>
					</tr>
				</table>
				<input type="hidden" name="adminid" id="adminid" value="${admin.id}" />
				<input type="hidden" name="callbackparams" value="${callbackparams!}">
			</div>
		</div>
		<div class="rightfoot">
			<div class="rightfootcontent">
				<input type="button" value="返 回" class="return" onclick="history.back()" />&nbsp;
	            <input type="submit" value="保 存" class="save" />
            </div>
        </div>
	</form>
    <div id="dialog_imagecrop" class="dialog"></div>
</body>
</html>